Step by step: How to debug an application running at a remote site

It is possible to debug an application running at a customer's site to assist in debugging problems remotely.

The technique described consists in instructing the application to connect to a given IP (step 5.) and installing a required file at client's site (step 9.).


1. Run the debugger: menu Start / Programs / VB Watch 2 / VB Watch Debugger.
2. Click the About box button in the toolbar and pick the IP of your machine (Local IP if the remote machine is connected to your local network , or Other IP if it is over the internet)
3. Click the Options... button in the toolbar and Open VB Watch Control Center...
4. In the control center, select the base debugging plan you wish to use, then click Save Plan and give it a new name such as Remote Debugging.
5. Now edit the Initialization Code under TRANSFORMATIONS and write the following line:
vbwServerAddress = "x.x.x.x" where x.x.x.x is the IP you picked.
Note that you can use a macro instead of a fixed IP:
- <THIS_MACHINE_LOCAL_IP> will be replaced by the local network IP
- <THIS_MACHINE_INTERNET_IP> will be replaced by the internet IP (the one you read in the Other IP box)
6. Also, make sure, under APPLY TO / After process that the plan compiles the project but don't run it after compile. You don't want to run it on your computer, do you ?
7. You can do any other modification to this plan you wish, then save it and exit the Control center.
Next time you don't need create a new plan. Just pick this one again, eventually update the IP.
8. Back in the profiler, click the Debug Project... button on the left and browse for your project. It gets instrumented and compiled.
9. Now you need to distribute your application at client site: do as usual. This time you need to distribute one more file:
VbwSck62.exe which is an activeX exe used for TCP-IP communications with the debugger, to be found in the VB Watch 2 folder.
As an activex, it can be installed anywhere and must be registered, not with regsvr32 this time (dll and ocx only), but simply by executing it with the /regserver command line:
"<path>\VbwSck62.exe" /regserver. You will not see any message.
10. You're done ! Now you can run the application at client's site and watch its execution from your machine.